package physicsModeler.environment;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

public class Post extends DrawEnvironment {

	public Post()
	{		
		redValue = 188;
		yellowValue = 143;
		greenValue = 143;
		
		sizeX = 20;
		sizeY = 180;
	}
	
	public Post(int newSizeX,int newSizeY)
	{
		redValue = 188;
		yellowValue = 143;
		greenValue = 143;
		
		sizeX = newSizeX;
		sizeY = newSizeY;
	}
	
	public Post(int newPositionX,int newPositionY,int newSizeX,int newSizeY)
	{
		redValue = 188;
		yellowValue = 143;
		greenValue = 143;
		
		positionX = newPositionX;
		positionY = newPositionY;
		
		sizeX = newSizeX;
		sizeY = newSizeY;
	}
	
	@Override
	public void draw(Graphics g) {
		// TODO Auto-generated method stub
		 // Setup the rendering hints
	    Graphics2D g2d = (Graphics2D) g;
	    RenderingHints hints = new RenderingHints(
	                                  RenderingHints.KEY_ANTIALIASING,
	                                  RenderingHints.VALUE_ANTIALIAS_ON);
	    g2d.addRenderingHints(hints);
	    Color color = new Color(redValue,greenValue,yellowValue);
		g2d.setColor(color);
		//g2d.drawOval(positionX, positionY, 50, 50);
		g2d.fill3DRect(positionX, positionY, sizeX, sizeY,true);
	}

	@Override
	public String getName() {
		// TODO Auto-generated method stub
		return "Post";
	}

}
